package cc.mrbird.assets.dao;

import cc.mrbird.assets.domain.AssetMana;
import cc.mrbird.assets.domain.AssetType;
import cc.mrbird.common.config.MyMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AssetManaMapper extends MyMapper<AssetMana> {

    void save(AssetMana assetMana);

    AssetMana findById(Long id);

    void update(AssetMana assetMana);
    List<AssetMana> findAllPoint();

    List<AssetMana> findAllList(AssetMana assetMana);
    List<AssetType> findAllTypeAndId();
    List<AssetType> findTotalType();
    List<AssetMana> findAllEquipment();
    List<AssetMana> findAllNormal();
    List<AssetMana> findAllFault();
    List<AssetMana> findAllUnconnected();
    List<AssetMana> findAllUnenabled();
    Integer findNumer(String asset_type);
    Integer findNumerNormal(String asset_type);
    Integer findNumerFault(String asset_type);
    Integer findNumerUnconnected(String asset_type);
    Integer findNumerUnenabled(String asset_type);

    List<AssetMana> findAllAssetByTypeAndStatus(@Param("asset_type") String asset_type,@Param("equipment_status") Integer equipment_status);

    Integer findFailureRateByType(@Param("asset_type") String asset_type, @Param("discard_time") String discard_time);
    Integer findNormalByType(@Param("asset_type") String asset_type, @Param("discard_time") String discard_time );

    List<AssetType> findAllType();

    Integer findAllByType(@Param("asset_type") String asset_type, @Param("discard_time") String discard_time);
}
